Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing step for gem-based theme conversion #6802

Merged
merged 1 commit into from
Feb 26, 2018

Conversation

Strangehill
Copy link
Contributor

@Strangehill Strangehill commented Feb 25, 2018

Theme documentation steps for converting a gem-based theme into 'intrinsic' site files are missing explanation about plugins.

First brought up in jekyll/minima#157

h/t @ashmaroli

@jekyll/documentation

Copy link
Member

@ashmaroli ashmaroli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs some corrections..

@@ -3,7 +3,7 @@ title: Themes
permalink: /docs/themes/
---

Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package up layouts, includes, and stylesheets in a way that can be overridden by your site's content.
Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package up plugins, assets, layouts, includes, and stylesheets in a way that can be overridden by your site's content.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theme-gems do not package plugins. The gemspec only specifies gem-based plugins that are then required by Jekyll while loading the theme-gem.
*.rb files in a _plugins directory in the theme-gem will not be loaded whatsoever (as of v3.7.x)

@@ -108,7 +108,33 @@ Suppose you want to get rid of the gem-based theme and convert it to a regular t

To do this, copy the files from the theme gem's directory into your Jekyll site directory. (For example, copy them to `/myblog` if you created your Jekyll site at `/myblog`. See the previous section for details.)

Then remove references to the theme gem in `Gemfile` and configuration. For example, to remove `minima`:
Then you must tell Jekyll about the plugins that were packaged by the theme. You can find these plugins in the theme's gemspec file as runtime dependencies. If you were converting the Minima theme, for example, you might see:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well.. plugins are not packaged by the theme, just referenced to..

- about the plugins that were packaged by the theme. You can find these plugins in the theme's gemspec...
+ about the plugins that are required by the theme. You can find these plugins listed in the theme's gemspec...

@Strangehill
Copy link
Contributor Author

Thank you. Correction attempted.

@ashmaroli ashmaroli dismissed their stale review February 25, 2018 08:58

concerns addressed..

@ashmaroli
Copy link
Member

/cc @jekyll/documentation

```ruby
# ./Gemfile

group :jekyll_plugins do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using group :jekyll_plugins, the plugins do not need to be added to _config.yml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: GitHub Pages do not require plugins via Bundler. So adding to _config.yml is always better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be listed as an either/or.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand. I've attempted to incorporate these notes. Please check for accuracy and style.

@pathawks
Copy link
Member

I like this. This does a really good job of explaining what the issue is, and how to work around it.
It goes into sufficient detail as to actually help the user understand what is happening, rather than just providing a series of commands to execute blindly while crossing fingers.
🏆👊

@Strangehill
Copy link
Contributor Author

Thanks!


Either way, don't forget to `bundle update`.

However, if you're publishing on GitHub Pages you should update only your `_config.yml` as GitHub Pages doesn't require plugins via Bundler.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small correction here:

- GitHub Pages doesn't require plugins
+ GitHub Pages doesn't load plugins

while require is technically correct in Ruby-lingo, the English equivalent 'load' is better suited here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great. I was concerned about that. Fixed.

Copy link
Member

@ashmaroli ashmaroli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@DirtyF
Copy link
Member

DirtyF commented Feb 26, 2018

@jekyllbot: merge +docs

@jekyllbot jekyllbot merged commit bc214d2 into jekyll:master Feb 26, 2018
jekyllbot added a commit that referenced this pull request Feb 26, 2018
@jekyll jekyll locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants